/*!
\copyright  Copyright (c) 2023 Qualcomm Technologies International, Ltd.\n
            All Rights Reserved.\n
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
*/

#ifndef LE_CORE_CHANNEL_EVENT_SPEC_H_
#define LE_CORE_CHANNEL_EVENT_SPEC_H_

#include "channel_event_spec_ids.h"
#include <bdaddr.h>
#include <connection.h>

/*! @{ */

/*! \brief The LE connection event channel */
#define EVENT_BUS_CHANNEL_LE_CORE  le_core_event_channel

/*! \brief The LE audio core event that are sent. */
typedef enum
{
    le_core_transmit_power_reporting,
    le_core_path_loss_threshold_report,
    le_core_subrate_change,
} le_core_event_t;
    
typedef struct
{
    uint8 subevent_code;
    hci_status status;
    uint16 conn_handle;
    uint8 reason;
    uint8 phy;
    uint8 tx_power_level;
    uint8 tx_power_level_flag;
    uint8 delta;
} le_core_transmit_power_reporting_t;

typedef struct
{
    uint8 subevent_code;
    uint16 conn_handle;
    uint8 current_path_loss;
    uint8 zone_entered;
} le_core_path_loss_threshold_report_t;

typedef struct
{
    uint8 subevent_code;
    hci_status status;
    uint16 conn_handle;
    uint16 subrate_factor;
    uint16 peripheral_latency;
    uint16 continuation_number;
    uint16 supervision_timeout;
} le_core_subrate_change_t;

/*! @} */

#endif /* LE_CORE_CHANNEL_EVENT_SPEC_H_ */
